--- ../../plenoxels/opt/util/nsvf_dataset.py	2024-02-13 12:06:07.930166019 -0500
+++ ../google/plenoxels/opt/util/nsvf_dataset.py	2024-02-13 10:46:24.456645151 -0500
@@ -45,6 +45,7 @@
         data_bbox_scale : float = 1.1,                    # Only used if normalize_by_bbox
         cam_scale_factor : float = 0.95,
         normalize_by_camera: bool = True,
+        n_images=-1,
         **kwargs
     ):
         super().__init__()
@@ -188,6 +189,10 @@
                 self.gt = self.gt[..., :3]
         self.gt = self.gt.float()
 
+        if not n_images is None and n_images > -1:
+            self.gt = self.gt[:n_images]
+            self.c2w = self.c2w[:n_images]
+
         assert full_size[0] > 0 and full_size[1] > 0, "Empty images"
         self.n_images, self.h_full, self.w_full, _ = self.gt.shape
 
